package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.ApproveCarbonCopyMapper;
import com.ruoyi.system.domain.ApproveCarbonCopy;
import com.ruoyi.system.service.IApproveCarbonCopyService;

/**
 * 审批抄送Service业务层处理
 *
 * @author ruoyi
 * @date 2024-03-27
 */
@Service
public class ApproveCarbonCopyServiceImpl implements IApproveCarbonCopyService
{
    @Autowired
    private ApproveCarbonCopyMapper approveCarbonCopyMapper;

    /**
     * 查询审批抄送
     *
     * @param id 审批抄送主键
     * @return 审批抄送
     */
    @Override
    public ApproveCarbonCopy selectApproveCarbonCopyById(String id)
    {
        return approveCarbonCopyMapper.selectApproveCarbonCopyById(id);
    }

    /**
     * 查询审批抄送列表
     *
     * @param approveCarbonCopy 审批抄送
     * @return 审批抄送
     */
    @Override
    public List<ApproveCarbonCopy> selectApproveCarbonCopyList(ApproveCarbonCopy approveCarbonCopy)
    {
        return approveCarbonCopyMapper.selectApproveCarbonCopyList(approveCarbonCopy);
    }

    /**
     * 新增审批抄送
     *
     * @param approveCarbonCopy 审批抄送
     * @return 结果
     */
    @Override
    public int insertApproveCarbonCopy(ApproveCarbonCopy approveCarbonCopy)
    {
        approveCarbonCopy.setCreateTime(DateUtils.getNowDate());
        return approveCarbonCopyMapper.insertApproveCarbonCopy(approveCarbonCopy);
    }

    /**
     * 修改审批抄送
     *
     * @param approveCarbonCopy 审批抄送
     * @return 结果
     */
    @Override
    public int updateApproveCarbonCopy(ApproveCarbonCopy approveCarbonCopy)
    {
        approveCarbonCopy.setUpdateTime(DateUtils.getNowDate());
        return approveCarbonCopyMapper.updateApproveCarbonCopy(approveCarbonCopy);
    }

    /**
     * 删除审批抄送信息
     *
     * @param id 审批抄送主键
     * @return 结果
     */
    @Override
    public int deleteApproveCarbonCopyById(String id)
    {
        return approveCarbonCopyMapper.deleteApproveCarbonCopyById(id);
    }
}
